<?php
class HelpAction extends MbaseAction {
	public $tbname = 'Help';
	public $obj = '';
	public $mpk = 'help_id';
	public $cate = '';
	public function index(){
		$m = M('Help');
		$datalist = $m->order('help_id asc')->select();
		$this->assign('datalist',$datalist);
		$help_id = isset($_GET['help_id'])? $_GET['help_id']:0;
		$datainfo = $datalist[0];
		if($help_id){
			foreach($datalist as $vo){
				if($help_id == $vo['help_id']){
					$datainfo = $vo;
				}
			}
		}
		$this->assign('datainfo',$datainfo);
		$this->display();
	}
}
?>